<{include file="scenter/block/header.html"}>

<div class="ucenter_t">

    <ul><li class="on">修改优惠信息</li></ul>

    <span class="r"><a href="<{link ctl='scenter/company/youhui:index'}>" class="pbtn">优惠信息管理</a></span>

</div>

<div class="ucenter_c">

<{if $group.priv.allow_youhui < 0}>

    <p class="tips"><span class="lock">您是【<b class="red"><{$group.group_name}></b>】没有权限添加优惠信息</span></p>

<{/if}>    

<form action="<{link ctl='scenter/company/youhui:edit'}>" mini-form="ucenter" method="post" ENCTYPE="multipart/form-data">

<input type="hidden" name="youhui_id" value="<{$detail.youhui_id}>" />

<table cellspacing="0" cellpadding="0" class="form">

    <tr><th><span class="red">*</span>标题：</th><td><input type="text" name="data[title]" value="<{$detail.title}>" class="input"/></td></tr>

    <tr><th>缩略图：</th><td><{if $detail.photo}><img src="<{$pager.img}>/<{$detail.photo}>" photo="<{$pager.img}>/<{$detail.photo}>" class="wh-100"/><{/if}><input type="file" name="youhui_thumb" class="input" /></td></tr>

    <tr><th>有效期：</th>

        <td>

            <input type="text" name="data[stime]" value="<{$detail.stime|format:"Y-m-d"}>" date="stime" class="input w-100"/>~

            <input type="text" name="data[ltime]" value="<{$detail.ltime|format:"Y-m-d"}>" date="ltime" class="input w-100"/>

            <span class="tip-comment">"0"或空不限</span>

         </td>

    </tr>

    <tr><th>描述：</th><td><textarea name="data[content]" kindeditor="full" style="width:700px;height:350px;"><{$detail.content}></textarea></td></tr>

    <tr><th></th><td><{if $group.priv.allow_youhui<0}><input type="button" value="没有权限" disabled="disabled" class="mpbtn" /><{else}><input type="submit" value="提交数据" class="green_btn" /><{/if}></td></tr></table>

</form>

</div>

<script type="text/javascript" src="<{$pager.res}>/kindeditor/kindeditor.js"></script>

<script type="text/javascript">

(function(K, $){

<{if $group.priv.allow_youhui < 0}>

var editor = KindEditor.create('textarea[kindeditor]',{readonlyMode : true});

$("[mini-form] input,[mini-form] select,[mini-form] textarea").attr("disabled", "disabled");

<{else}>

var editor = KindEditor.create('textarea[kindeditor]',{uploadJson : '<{link ctl="magic:editorupload"}>', extraFileUploadParams:{OTOKEN:"<{$OTOKEN}>"}});

<{/if}>

})(window.KT, window.jQuery);

</script>

<{include file="scenter/block/footer.html"}>